package fjh.Interface;

public class TestWarrior{
    public static void main(String[] args) {

        FightTablt fightTablt=new Warrior();
        fightTablt=new BloodWarrior();
        while(3>2) {
            if(fightTablt instanceof Warrior)
            {
                Warrior warrior=(Warrior)fightTablt;
                warrior.show();
            }else if(fightTablt instanceof BloodWarrior)
            {
                BloodWarrior bloodWarrior=(BloodWarrior)fightTablt;
                bloodWarrior.show();
            }

            fightTablt.injure(10);
            fightTablt.win();
        }


    }
}
